<template>
  {{ showValue }}
</template>

<script setup>
import {DefaultFieldDefinition} from '@/components/form/DefaultFormDefinition';
import {computed} from 'vue';
import {real} from '@/utils/CommonUtils';

const props = defineProps({
  field: {
    type: Object,
    default: DefaultFieldDefinition
  },
  data: {
    type: Object,
    default: () => ({})
  }
});
const showValue = computed(() => {
  try {
    let obj = real(props.data);
    return obj[`${real(props.field).tableFieldName}`] + '' === '1' ? '是' : '否';
  } catch (e) {

  }
});
</script>
